/* 
 * File:   TimeBlock.h
 * Author: Claudio
 *
 * Created on March 6, 2013, 8:38 PM
 */

#ifndef TIMEBLOCK_H
#define	TIMEBLOCK_H

#include <vector>
#include "Imagens.h"
using namespace std;

class TimeBlock {
public:
	TimeBlock(vector<AAM::Imagens*>::iterator _begin, vector<AAM::Imagens*>::iterator _end);
	vector<TimeBlock*> getSubBlocks();
	vector<AAM::Imagens*>::iterator getBegin();
	vector<AAM::Imagens*>::iterator getEnd();
	int getNumberOfNodes();
	bool isLeaf();
	void reduceToNNodes(int n);
	int getNumberOfSubBlocks();
	int getNumberOfImagesInThisBlock();
private:
	void addTimeBlock(TimeBlock *block);
	void encontrarDivisorias(vector<AAM::Imagens*>::iterator begin, vector<AAM::Imagens*>::iterator end, vector<double> divisorias, int level);

	vector<TimeBlock*> tb;
	vector<AAM::Imagens*>::iterator begin;
	vector<AAM::Imagens*>::iterator end;
	vector<double> divisorias;
};


#endif	/* TIMEBLOCK_H */

